<template>
  <div>
    <h1>住宿推荐</h1>
    <el-row justify="space-between">
      <el-col :xs="24" :lg="7" v-for="hotel in hotelList" :key="hotel.hoteId">
        <el-card >
              <el-image
                  :src="hotel.hotelImage"
                  fit="contain"
              ></el-image>
          <el-divider/>
          {{hotel.hotelName}}
          <el-divider/>
          <div style="height:120px;overflow-y: auto">
            {{hotel.hotelDescription}}
          </div>
        </el-card>
        <el-divider/>
      </el-col>
    </el-row>

  </div>

</template>

<script>
import {getHotelList} from "@/api/multimedia";

export default {
  name: "hotel",
  data(){
    return{
      hotelList:[],
    }
  },
  mounted() {
    this.getHotel()
  },
  methods:{
    getHotel(){
      getHotelList().then(response=>{
        this.hotelList=response.data.hotelList
      })
    }
  }
}
</script>

<style scoped>

</style>
